package com.squirrels.server;

import com.squirrels.server.config.ServerConfig;
import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;

/**
 * 网络服务启动入口
 */

@SpringBootApplication
public class ServerApplication implements CommandLineRunner {

	@Autowired
	private ServerConfig serverConfig;

	public static void main(String[] args) throws Exception {
		SpringApplication.run(ServerApplication.class,args);
	}

	// 启动netty
	@Override
	public void run(String... args) throws Exception {
		serverConfig.start();
	}
}
